package com.server.questionbank.snframe.controller.Course.pojo.Exercises;

import com.server.questionbank.snframe.domain.QuestionBank.Exercises;
import com.server.questionbank.snframe.domain.QuestionBank.Question;
import lombok.Data;

@Data
public class UpdateQuestion {
    private Long recId;
    /** 题目ID */
    private Long exercisesId;
    /** 问题题目 */
    private String questionTitle;
    /** 问题类型 */
    private String questionType;
    /** 难易度 */
    private Integer difficulty;
    /** 问题显示顺序 */
    private Long displayOrder;
    /** 选项 */
    private String answerOptions;
    /** 问题答案 */
    private String answer;
    /** 问题解析 */
    private String analysis;
    /** 分数 */
    private float score;
    /** 题目信息实体 */
    private Exercises exercises;

    public Question toQuestion() {
        Question question = new Question();
        question.setRecId(this.recId);
        question.setExercisesId(this.exercisesId);
        question.setQuestionTitle(this.questionTitle);
        question.setQuestionType(this.questionType);
//        question.setDifficulty(this.difficulty);
        question.setDisplayOrder(this.displayOrder);
        question.setAnswerOptions(this.answerOptions);
        question.setAnswer(this.answer);
        question.setAnalysis(this.analysis);
        question.setScore(this.score);
        return question;
    }
}
